<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<script>
			
			// 1. 创建对象
			var obj1 = new Object("abc123");
			console.log(obj1);
			console.log(obj1.constructor);
			
			var stu1 = {};
			stu1.id = 1;
			stu1.name = "张三";
			stu1.age = 18;
			console.log(stu1.constructor);
			console.log(stu1.id+","+stu1.name+","+stu1.age);
			
			var stu2 = {
				id:2,
				name:"王五",
							age:19
			}
			console.log(stu2.id+","+stu2.name+","+stu2.age);
			
			var stu3 = {};
			stu1.["id"] = 1;
			stu1.["name"] = "张三";
			stu1.["age"] = 18;
			console.log(stu3.id+","+stu3.name+","+stu3.age);
			
			var stu4 = {
				id:4,
				name:"赵六",
				age:20,
				study:function()
				{
					console.log(this.name+"正在学习");
				}
			}
			console.log(stu4.id+","+stu4.name+","+stu4.age);
			stu4.study();
			
		</script>
	</body>
</html>
